-- GENERATED SPELL FOR [Eye of Dar'Khan] --


function spell0_16320(pUnit, Event) --@Befuddlement,n/a--
pUnit:FullCastSpellOnTarget(8140,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16320', 15275, 1)
end

function spell1_16320(pUnit, Event) --@Curse of Agony,n/a--
pUnit:FullCastSpellOnTarget(14868,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16320', 30000, 1)
end

function Sorts_16320(pUnit, Event)
local choix_sorts_16320 = math.random(0, 1)
if choix_sorts_16320 == 0 then
pUnit:RegisterEvent('spell0_16320', 1, 1)
end
if choix_sorts_16320 == 1 then
pUnit:RegisterEvent('spell1_16320', 1, 1)
end
end

function mob16320_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16320', math.random(1500, 3000), 1)
end

function mob16320_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16320_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16320_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16320, 1, 'mob16320_Action')
RegisterUnitEvent(16320, 2, 'mob16320_Leave')
RegisterUnitEvent(16320, 3, 'mob16320_Kill')
RegisterUnitEvent(16320, 4, 'mob16320_Die')
